package asphalt2.factory.impl.bind
{
	import asphalt2.factory.impl.CSSBeanFactory;
	import asphalt2.factory.impl.asphalt2container_internal;
	
	use namespace asphalt2container_internal;
	
	public class LinkedBindingBuilder
	{
		private var name:String;
		private var factory:CSSBeanFactory;
		
		public function LinkedBindingBuilder(name:String,factory:CSSBeanFactory){
			this.name = name;
			this.factory = factory;
		}
		
		public function toType(clazz:Class):ScopedBindingBuilder{
			factory.asphalt2container_internal::createBeanDesc(name,clazz);
			return new ScopedBindingBuilder(name,factory);
		}
		public function toInstance(instance:Object):void{
			factory.asphalt2container_internal::createConstant(name,instance);
		}		
	}
}